package com.tvein.sanguo.zone.controller
{
	//flash
	//pureMVC
	import org.puremvc.as3.multicore.interfaces.ICommand;
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.utilities.fabrication.patterns.command.SimpleFabricationCommand;
	//custom
	import com.tvein.sanguo.zone.view.ZoneMediator;
//
	public class ZoneText extends SimpleFabricationCommand implements ICommand
	{
		private var zoneMediator:ZoneMediator;
		
		override public function execute(notification:INotification) : void
		{
			zoneMediator = facade.retrieveMediator(ZoneMediator.NAME) as ZoneMediator;
			
			zoneMediator.zoneShell.txtZone.htmlText = notification.getBody().replace( /^([\s|\t|\n]+)?(.*)([\s|\t|\n]+)?$/gm, "$2");
		}
	}
}